/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2019.
 * Description: internal header for early kbox
 * Author: xiechengliang
 * Create: 2019-12-9
 */

#ifndef EARLY_KBOX_INTERNAL_H
#define EARLY_KBOX_INTERNAL_H

#ifdef CONFIG_ARM64
extern void __init ekbox_create_mapping(phys_addr_t phys, unsigned long virt,
					phys_addr_t size, pgprot_t prot);
#endif

#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_PPC)
extern __init char *ekbox_mm_create(resource_size_t ekbox_addr,
				    unsigned long ekbox_size);
extern __init void ekbox_mm_clean(char *ekbox_start_vir,
				  unsigned long ekbox_size);
#endif

int __init ekbox_param_parse(char *cmdline_ekbox);
int ekbox_init(void);
int ekbox_reinit(void);

struct console;
extern void register_nolevel_console(struct console *newcon);
extern struct console *nolevel_console_drivers;

#endif
